<html>
<head>
  <script src="../OLLoader.js"></script>
  <script type="text/javascript">
    var polygon;
    var components = [new OpenLayers.Geometry.Point(10,10), new OpenLayers.Geometry.Point(0,0)];
    var components2 = [new OpenLayers.Geometry.Point(10,10), new OpenLayers.Geometry.Point(0,0), new OpenLayers.Geometry.Point(10,0), new OpenLayers.Geometry.Point(10,10)];
    var linearRing = new OpenLayers.Geometry.LinearRing(components);
    var linearRing2 = new OpenLayers.Geometry.LinearRing(components2);
    
    var polygon = new OpenLayers.Geometry.Polygon([linearRing]);
    var polygon2 = new OpenLayers.Geometry.Polygon([linearRing2]);
        
    function test_MultiPolygon_constructor (t) {
        t.plan( 2 );
        multipolygon = new OpenLayers.Geometry.MultiPolygon();
        t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );
        t.eq( multipolygon.CLASS_NAME, "OpenLayers.Geometry.MultiPolygon", "multipolygon.CLASS_NAME is set correctly");
    }

    function test_MultiPolygon_constructor (t) {
        t.plan( 3 );
        multipolygon = new OpenLayers.Geometry.MultiPolygon([polygon, polygon2]);
        t.ok( multipolygon instanceof OpenLayers.Geometry.MultiPolygon, "new OpenLayers.Geometry.MultiPolygon returns multipolygon object" );
        t.eq( multipolygon.CLASS_NAME, "OpenLayers.Geometry.MultiPolygon", "multipolygon.CLASS_NAME is set correctly");
        t.eq( multipolygon.components.length, 2, "multipolygon.components.length is set correctly");
    }


  </script>
</head>
<body>
</body>
</html>
